import 'package:finance_app/src/entities/setting_data_import_opening_balances_entity.dart';

class SettingDataImportOpeningBalancesListEntity {
  List<SettingDataImportOpeningBalancesEntity> dataMapped;
  String default_currency_code;

  SettingDataImportOpeningBalancesListEntity(
      {this.dataMapped, this.default_currency_code});

  factory SettingDataImportOpeningBalancesListEntity.fromJson(
      Map<String, dynamic> json) {
    return SettingDataImportOpeningBalancesListEntity(
      dataMapped: json['dataMapped'] != null
          ? (json['dataMapped'] as List)
              .map((i) => SettingDataImportOpeningBalancesEntity.fromJson(i))
              .toList()
          : null,
      default_currency_code: json['default_currency_code'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['default_currency_code'] = this.default_currency_code;
    if (this.dataMapped != null) {
      data['dataMapped'] = this.dataMapped.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
